

package com.hazelcast.scheduledexecutor.impl.operations;

import com.hazelcast.scheduledexecutor.impl.DistributedScheduledExecutorService;
import com.hazelcast.scheduledexecutor.impl.ScheduledExecutorDataSerializerHook;
import com.hazelcast.spi.impl.operationservice.MutatingOperation;

public class ShutdownOperation extends AbstractSchedulerOperation implements MutatingOperation {

    public ShutdownOperation() {
    }

    public ShutdownOperation(String schedulerName) {
        super(schedulerName);
    }

    @Override
    public void run() throws Exception {
        ((DistributedScheduledExecutorService) getService()).shutdownExecutor(schedulerName);
    }

    @Override
    public int getClassId() {
        return ScheduledExecutorDataSerializerHook.SHUTDOWN;
    }

}
